import request from '@/utils/request'

// 查询成就列表
export function listAchievement(query) {
  return request({
    url: '/tianqi/achievement/list',
    method: 'get',
    params: query
  })
}

// 查询成就详细
export function getAchievement(id) {
  return request({
    url: '/tianqi/achievement/' + id,
    method: 'get'
  })
}

// 新增成就
export function addAchievement(data) {
  return request({
    url: '/tianqi/achievement',
    method: 'post',
    data: data
  })
}

// 修改成就
export function updateAchievement(data) {
  return request({
    url: '/tianqi/achievement',
    method: 'put',
    data: data
  })
}

// 删除成就
export function delAchievement(id) {
  return request({
    url: '/tianqi/achievement/' + id,
    method: 'delete'
  })
}

// 关于我们
export function aboutInfo(query) {
  return request({
    url: '/tianqi/about/info',
    method: 'get',
    params: query
  })
}

// 修改关于我们视频文字介绍
export function updateAbout(data) {
  return request({
    url: '/tianqi/about',
    method: 'put',
    data: data
  })
}

// 部门列表
export function listJoinDept(query) {
  return request({
    url: '/tianqi/join/dept/list',
    method: 'get',
    params: query
  })
}

// 新增部门
export function addJoinDept(data) {
  return request({
    url: '/tianqi/join',
    method: 'post',
    data: data
  })
}

// 修改部门
export function updateJoinDept(data) {
  return request({
    url: '/tianqi/join',
    method: 'put',
    data: data
  })
}

// 删除部门
export function delJoinDept(id) {
  return request({
    url: '/tianqi/join/' + id,
    method: 'delete'
  })
}